const path = require('path');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'three-tools.js',
    library: {
      name: "three-tools",
      type: "umd"
    },
  },
  module: {
    rules: [
      {
        test: /\.css$/, // 正则表达式，表示.css后缀的文件
        use: ['style-loader', 'css-loader'], // 针对css文件使用的loader，注意有先后顺序，数组项越靠后越先执行
      },
      {
        test: /.(jpg|png)$/,
        use: 'file-loader',
      }
    ]
  }
}

